package com.tuhui.listener;

import java.io.File;

public class FtpThread implements Runnable {
    private  static String path;

    public FtpThread(String paths){
        path = paths;
    }

    @Override
    public void run() {
            System.out.println("文件异步上传开始");
            File file = new File(path);
            File[] newFileList = file.listFiles();
           for (File fileIndex : newFileList) {
               //如果这个文件是文件，则进行上传
               if (fileIndex.isFile()) {
                   Listener.ftpUpload(fileIndex);
               }
           }
    }
}
